package com.xbongbong.saas.domain.dao;

import com.xbongbong.saas.domain.entity.MarketingSettingEntity;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import java.util.List;
import java.util.Map;

@Mapper
@Repository
public interface MarketingSettingDao {
    Long insert(MarketingSettingEntity entity);

    void insertBatch(List<MarketingSettingEntity> list);

    MarketingSettingEntity getByKey(@Param("key") Long key, @Param("corpid") String corpid );

    Integer update(MarketingSettingEntity entity);

    List<MarketingSettingEntity> findEntities(@Param("param") Map<String, Object> param);

    Integer getEntitiesCount(@Param("param") Map<String, Object> param);

    MarketingSettingEntity getByType(@Param("settingType")Integer settingType,@Param("corpid") String corpid);

    List<MarketingSettingEntity> getByCorpid(@Param("corpid")String corpid);
}